(defun c:itout ( / )
  (setq href_list NIL)
  (setq it(open "c:/sites/paracadd/lisp/lisp_lst.htm" "r"))
  (setq ito (open "c:/sites/paracadd/lisp/lisp_sum.htm" "w"))
  (while (and (setq itr (read-line it))(not (wcmatch (strcase itr) "*<BODY*")))
    (write-line itr ito)
  )
  (write-line itr ito)
  (while (and (setq itr (read-line it))(not (wcmatch (strcase itr) "*</BODY*")))
    (if (wcmatch itr "*<a href*")
      (progn
        (setq itr_cnt 1)
        (COND
          ((wcmatch itr "*<a href*</a>*")
            (while (not (wcmatch (substr itr itr_cnt) "<a href*"))
              (setq itr_cnt (1+ itr_cnt))
            )
            (setq href_not_closed NIL)
            (setq itr_step 1)
            (while (not (wcmatch (substr itr 1 itr_step) "*</a>"))
              (setq itr_step (1+ itr_step))
            )
;;;            (write-line (substr itr itr_cnt (- itr_step (1- itr_cnt))) ito)
           (if (or
                 (and href_list (member (strcase (substr itr itr_cnt (- itr_step (1- itr_cnt))))(mapcar 'strcase href_list)))
                 (not (wcmatch (strcase (substr itr itr_cnt (- itr_step (1- itr_cnt)))) "*>*.LSP*</A>"))
                 (wcmatch itr "*webster*")
               )
             nil
            (setq href_list (append href_list (list (substr itr itr_cnt (- itr_step (1- itr_cnt))))))
           ))
;;;          ((wcmatch itr "*<a href*")
;;;            (while (not (wcmatch (substr itr itr_cnt) "<a href*"))
;;;              (setq itr_cnt (1+ itr_cnt))
;;;            )
;;;            (setq href_not_closed T)
;;;            (write-line (substr itr itr_cnt) ito)
;;;           )
        )
      )
;;;      (progn
;;;        (cond
;;;          ((and href_not_closed (not (wcmatch itr "*</a>*")))
;;;           (write-line itr ito))
;;;          ((and href_not_closed (wcmatch itr "*</a>*"))
;;;            (setq itr_step 1)
;;;            (while (not (wcmatch (substr itr 1 itr_step) "*</a>"))
;;;              (setq itr_step (1+ itr_step))
;;;            )
;;;            (write-line (substr itr 1 itr_step) ito)
;;;            (setq href_not_closed NIL)
;;;           )
;;;        )
;;;      )
    )
  )
  (setq href_list (acad_strlsort href_list))
  (foreach n href_list
    (write-line n ito)
    (write-line "&#8226;" ito)
  )
  (write-line itr ito)
  (setq itr (read-line it))
  (while (and itr (not (wcmatch (strcase itr) "*</HTML*")))
    (write-line itr ito)
    (setq itr (read-line it))
  )
  (if itr
    (write-line itr ito)
  )
  (close it)
  (close ito)
  (princ)
)